<template>
  <div class='items_page_top'>
    <div class="contant">
      <div class="itemspage_top_tabbar">
        <i class="itemspage_top_navli" @click="itemspageChangeHome">首页</i>
        <i class="itemspage_top_navli">动态</i>
        <i class="itemspage_top_navli" @click="itemspageChangeUsers">个人主页</i>
        <i class="itemspage_top_navli">库</i>
      </div>
      <span class="project-search">
        <input placeholder="" v-model="input">
        <img src="../assets/search.png">
      </span>
    </div>

  </div>
</template>

<script>
export default {
  name: "Top",
  data() {
    return {
      input: ''
    }
  },
  methods: {
    itemspageChangeHome() {
      this.$router.push('/home')
    },
    itemspageChangeUsers() {
      console.log(this.$cookies.get("userEmail") == "null" || this.$cookies.get("userPWD") == "null")
      if (this.$cookies.get("userEmail") == "null" || this.$cookies.get("userPWD") == "null") {
        this.$refs.HomeLeft.nowLogin = true;
        return;
      }
      this.$router.push('/space/main')
    }
  }
}
</script>

<style scoped>
.items_page_top {
  z-index: 10;
  height: 62px;
  width: 100%;
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: end;
  padding-top: -10px;
  margin: -10px;
  background-color: white;
  box-shadow: 0px 5px 7px rgb(11 51 41 / 15%);
}

.itemspage_top_tabbar {
  display: flex;
  position: absolute;
  top: 27px;
  left: 128px;
  height: 30px;
  width: 260px;
}

.itemspage_top_navli {
  font-style: normal;
  font-size: 16px;
  font-family: 微软雅黑;
  color: black;
  padding-right: 25px;
}

.itemspage_top_navli:hover {
  cursor: pointer;
}

.project-search {
  display: inline-block;
  width: 610px;
  height: 36px;
  border-radius: 5px;
  padding-right: 10px;
}
</style>
